﻿'Receiver
Public Class Unidad

    Private _nombre As String = ""
    Private _vida As Integer = 100

    Sub New(nombre As String)
        _nombre = nombre
    End Sub

    Public Sub MoverA(x As Integer, y As Integer)
        Output.Print(String.Format("Moviendo {0} a {1},{2}", _nombre, x, y))
    End Sub

    Public Sub RestarVida(percent As Integer)
        _vida = _vida - percent
        Output.Print(String.Format("Porcentaje de vida de {0} es {1}", _nombre, _vida))
    End Sub
End Class
